package com.wing.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.CellInventoryInout;
import com.wing.cabinet.model.request.UseInventoryInoutForm;
import com.wing.common.utils.JsonResult;
import com.wing.order.model.entity.OldNewOrder;
import com.wing.order.model.request.OldNewOrderForm;
import com.wing.order.model.response.OldNewOrderVO;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * 以旧换新(存旧刀，领新刀)-Service
 *
 * @author
 */
public interface OldNewOrderService extends IService<OldNewOrder> {

    /**
     * 添加
     *
     * @param oldNewOrderForm
     * @return
     */
    int add(OldNewOrderForm oldNewOrderForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<OldNewOrderVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<OldNewOrderVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    OldNewOrderVO get4appById(Long id);

    JsonResult<CellInventoryInout> inventoryInOut(@RequestBody UseInventoryInoutForm useInventoryInoutForm);
}
